#import "ZQSubPageOne.h"
#import "ZQBaseTablePage.h"
#import "ZQVideoViewCell.h"
#import "ZQVideoTableViewPage.h"
static NSString * const ID = @"cell";
@interface ZQVideoTableViewPage ()
@property (nonatomic , copy) NSArray *imgArr;
@property (nonatomic , copy) NSArray *textArr;
@property (nonatomic , copy) NSArray *pidArr;
@end
@implementation ZQVideoTableViewPage
- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title =  @"足球教学";
    self.imgArr = @[@"jc1",@"jc2",@"jc3",@"jc4",@"jc5",@"jc6",@"jc7",@"jc8"];
    self.textArr = @[@"科学训练足球技巧",@"踢足球教学",@"冠军俱乐部教学",@"技巧性训练教学",@"足球过人技巧",@"米兰的足球训练营",@"五人足球法",@"职业球员的技术教学"];
    self.pidArr = @[@149,@154,@153,@152,@155,@561,@151,@150];
    [self.tableView registerNib:[UINib nibWithNibName:NSStringFromClass([ZQVideoViewCell class]) bundle:nil] forCellReuseIdentifier:ID];
    self.tableView.rowHeight = 250
    ;
 self.tableView.separatorStyle =  UITableViewCellSeparatorStyleNone;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}
#pragma mark - Table view data source
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 8;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    ZQVideoViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID forIndexPath:indexPath];
    cell.bgImageView.image = [UIImage imageNamed:[NSString stringWithFormat:@"%@.jpg",self.imgArr[indexPath.row]]];
    cell.bgLabel.text = self.textArr[indexPath.row];
    return cell;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
        ZQBaseTablePage *one = [ZQBaseTablePage new];
        one.pid = [self.pidArr[indexPath.row] integerValue];
        one.navTitle =  self.textArr[indexPath.row];
        [self.navigationController pushViewController:one animated:YES];
}
@end
